<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 2. Console</a><br />
<a href="console_drawing.html">&lt; 2.2 Drawing on the root console</a>
</td><td width="60%">
<p align="center">
=====================================<br />
Setting the default foreground color<br />
=====================================<br />
</p></td><td width="20%">
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
<p class="code"><pre>
C++ : void TCODConsole::setForegroundColor(TCODColor back)
C   : void TCOD_console_set_foreground_color(TCOD_console_t con,TCOD_color_t back)
Py  : console_set_foreground_color(con,back)
</pre></p>
This function changes the default foreground color for a console. The default foreground color is used by several drawing functions like <a href="console_clear.html">clear</a>, <a href="console_put_char.html">putChar</a>, ...<br />
To change the default foreground color of the root console, use 
<p class="code"><pre>
C++ : TCODConsole::root->setForegroundColor(myColor)
C   : TCOD_console_set_foreground_color(NULL, my_color)
Py  : libtcod.console_set_foreground_color(0, my_color)
</pre></p>
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>con</td><td>In the C version, the offscreen console handler or NULL for the root console.</td></tr>
<tr><td>back</td><td>The new default foreground color for this console.</td></tr>
</table>

